package cn.edu.sgu.www.mhxysy.service.zuoqi.impl;

import cn.edu.sgu.www.mhxysy.entity.zuoqi.ZuoqiChongwu;
import cn.edu.sgu.www.mhxysy.mapper.zuoqi.ZuoqiChongwuMapper;
import cn.edu.sgu.www.mhxysy.service.zuoqi.ZuoqiChongwuService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Service
public class ZuoqiChongwuServiceImpl implements ZuoqiChongwuService {

    private final ZuoqiChongwuMapper zuoqiChongwuMapper;

    @Autowired
    public ZuoqiChongwuServiceImpl(ZuoqiChongwuMapper zuoqiChongwuMapper) {
        this.zuoqiChongwuMapper = zuoqiChongwuMapper;
    }

    @Override
    public ZuoqiChongwu selectByChongwuId(String chongwuId) {
        QueryWrapper<ZuoqiChongwu> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("chongwu_id", chongwuId);

        return zuoqiChongwuMapper.selectOne(queryWrapper);
    }

}